package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallMessageTpl;
import com.appkubes.mall.core.po.MallMessageTplExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallMessageTplMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message_tpl
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallMessageTplSqlProvider.class, method="countByExample")
    long countByExample(MallMessageTplExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message_tpl
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallMessageTplSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallMessageTplExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message_tpl
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_message_tpl",
        "where message_tpl_key = #{messageTplKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String messageTplKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message_tpl
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_message_tpl (message_tpl_key, app_key, ",
        "title, content, ",
        "`type`, type_name, ",
        "create_time, update_time, ",
        "version)",
        "values (#{messageTplKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{title,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, ",
        "#{type,jdbcType=VARCHAR}, #{typeName,jdbcType=VARCHAR}, ",
        "#{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, ",
        "#{version,jdbcType=INTEGER})"
    })
    int insert(MallMessageTpl record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message_tpl
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallMessageTplSqlProvider.class, method="insertSelective")
    int insertSelective(MallMessageTpl record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message_tpl
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallMessageTplSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="message_tpl_key", property="messageTplKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
        @Result(column="content", property="content", jdbcType=JdbcType.VARCHAR),
        @Result(column="type", property="type", jdbcType=JdbcType.VARCHAR),
        @Result(column="type_name", property="typeName", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallMessageTpl> selectByExampleWithRowbounds(MallMessageTplExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message_tpl
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallMessageTplSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="message_tpl_key", property="messageTplKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
        @Result(column="content", property="content", jdbcType=JdbcType.VARCHAR),
        @Result(column="type", property="type", jdbcType=JdbcType.VARCHAR),
        @Result(column="type_name", property="typeName", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallMessageTpl> selectByExample(MallMessageTplExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message_tpl
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "message_tpl_key, app_key, title, content, `type`, type_name, create_time, update_time, ",
        "version",
        "from mall_message_tpl",
        "where message_tpl_key = #{messageTplKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="message_tpl_key", property="messageTplKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
        @Result(column="content", property="content", jdbcType=JdbcType.VARCHAR),
        @Result(column="type", property="type", jdbcType=JdbcType.VARCHAR),
        @Result(column="type_name", property="typeName", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallMessageTpl selectByPrimaryKey(String messageTplKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message_tpl
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallMessageTplSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallMessageTpl record, @Param("example") MallMessageTplExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message_tpl
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallMessageTplSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallMessageTpl record, @Param("example") MallMessageTplExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message_tpl
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallMessageTplSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallMessageTpl record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_message_tpl
     *
     * @mbg.generated
     */
    @Update({
        "update mall_message_tpl",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "title = #{title,jdbcType=VARCHAR},",
          "content = #{content,jdbcType=VARCHAR},",
          "`type` = #{type,jdbcType=VARCHAR},",
          "type_name = #{typeName,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=INTEGER},",
          "update_time = #{updateTime,jdbcType=INTEGER},",
          "version = #{version,jdbcType=INTEGER}",
        "where message_tpl_key = #{messageTplKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallMessageTpl record);
}